<template>
	<view>
		<swiper class="swiper" circular indicator-dots autoplay :interval="1500">
			<swiper-item v-for="item in detail.banners" :key="item">
				<image :src="item" mode=""></image>
			</swiper-item>
		</swiper>
		
		<view>
			{{ detail.proname }}
		</view>
		
	</view>
</template>

<script>
	import {getDetail} from '../../api/home.js'
	export default {
		data() {
			return {
				detail: {}
			}
		},
		onLoad(options) {
			console.log(options);
			const eventChannel = this.getOpenerEventChannel();
			 eventChannel.on('proid', function(data) {
			    console.log(data)
			  })
			  
			getDetail(options.proid).then(res => {
				
				res.data.banners = res.data.banners[0].split(',')
				this.detail = res.data
				console.log(res);
			})
			
		},
		methods: {
			
		}
	}
</script>

<style scoped lang="scss">
.swiper {
	height: 350px;
	width: 100%;
	image {
		height: 100%;
		width: 100%;
	}
}
</style>
